<?php
/**
 * @version     1.0.0
 * @package     mylits engine
 * @license     GNU General Public License version 3
 * @author      Arfan Fudyartanto D N <arfan@mylits.com> - http://mylits.com
 */
include 'config/configuration.php';

#define constan variable
define('ENGINE_DIR', $config['engine_dir']);
define('APP_DIR', str_replace('\\', '/', dirname(__FILE__)) . '/');
define('BASE_URL', "http" . ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") ? "s" : "") . "://" . $_SERVER['HTTP_HOST'] . str_replace(basename($_SERVER['SCRIPT_NAME']), "", $_SERVER['SCRIPT_NAME']));

#important don't change this
require_once ENGINE_DIR . '/core/classes/config.php';

if (is_file(ENGINE_DIR . '/mylits.php')) {
    require_once ENGINE_DIR . '/mylits.php';
    $mylits = new Mylits();

    #add main mylits style and js
    $mylits->addScript(BASE_URL . 'assets/js/jquery-1.10.2.min.js');
    $mylits->addScript(BASE_URL . 'assets/js/jquery.ba-hashchange.min.js');
    $mylits->addScript(BASE_URL . 'assets/js/mylits.js');
    $mylits->addStyle(BASE_URL. 'assets/css/mylits.css');
    $mylits->addStyle(BASE_URL. 'assets/css/mylits.widget.default.css');

    $html = $mylits->result();
}

#show the result
echo $html;
?>
